-- GENERATED SPELL FOR [Defias Squallshaper] --


function spell0_1732(pUnit, Event) --@Fire Blast,n/a--
pUnit:FullCastSpellOnTarget(2138,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1732', 0, 1)
end

function spell1_1732(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_1732', 0, 1)
end

function spell2_1732(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(122,pUnit)
pUnit:RegisterEvent('Sorts_1732', 8000, 1)
end

function Sorts_1732(pUnit, Event)
local choix_sorts_1732 = math.random(0, 2)
if choix_sorts_1732 == 0 then
pUnit:RegisterEvent('spell0_1732', 1, 1)
end
if choix_sorts_1732 == 1 then
pUnit:RegisterEvent('spell1_1732', 1, 1)
end
if choix_sorts_1732 == 2 then
pUnit:RegisterEvent('spell2_1732', 1, 1)
end
end

function mob1732_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1732', math.random(1500, 3000), 1)
end

function mob1732_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1732_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1732_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1732, 1, 'mob1732_Action')
RegisterUnitEvent(1732, 2, 'mob1732_Leave')
RegisterUnitEvent(1732, 3, 'mob1732_Kill')
RegisterUnitEvent(1732, 4, 'mob1732_Die')
